The present invention is related to a method for writing data into a writable non-volatile memory such as an EEPROM provided in an electronic unit mounted on an automobile.
Conventionally, as to tests performed when on-vehicle electronic units on which writable non-volatile memories such as EEPROMs are mounted are shipped, there are few cases that data are written into these non-volatile memories in order to test various functions and various circuits employed in the on-vehicle electronic units. The major reason is given as follows. Originally, there are many cases that data input means cannot be connected to input terminals of these on-vehicle electronic units. Generally speaking, only switches are connected to the input terminals of the on-vehicle electronic units. These switches are constituted by door locking switches, and switches used to powered door windows for instructing that door windows ascend and/or descend. It is practically difficult to write certain data into non-volatile memories by using these switches.
However, in such electronic units assembled in on-vehicle LANs, arbitrary data may be written into non-volatile memories via communication input interfaces of these electronic units by way of serial communications.
FIG. 8 is a schematic block diagram for showing a method for writing data into a non-volatile memory employed in an electronic unit assembled in an on-vehicle LAN. In this on-vehicle LAN, a serial communication interface (I/F) 2 of a test apparatus 1 is connected to an on-vehicle LAN input/output circuit 4 of an on-vehicle electronic unit 3, and arbitrary data outputted from the test apparatus 1 is supplied to a microcomputer chip (simply referred to as a xe2x80x9cmicrocomputerxe2x80x9d hereinafter) 5 employed in the electronic unit 3 via the on-vehicle LAN input/output circuit 4. Then, in the microcomputer 5, the acquired data is stored into a non-volatile memory 6 such as an EEPROM provided within this microcomputer 5.
As previously described, if such an electronic unit 3 applied to the on-vehicle LAN is indicated in FIG. 8 is available, then the arbitrary data can be stored into the non-volatile memory 6 by employing the on-vehicle LAN input/output circuit 4 while utilizing the serial communicating method. However, practically speaking, the electronic unit 3 itself applicable to the on-vehicle LAN is not so popular. As a consequence, when the arbitrary data is tried to be stored from the test apparatus 1 into the non-volatile memory 6 employed in the electronic unit 3 which is not applicable to such an on-vehicle LAN, an interface circuit exclusively used to this type of electronic unit 3 is newly required. In this specific case, there are problems that this electronic unit 3 would become large scale and would require high cost.
The present invention has been made to solve these problems, and therefore, has an object to provide a method for readily writing arbitrary data into a non-volatile memory employed in an on-vehicle electronic unit. That is, the data writing method for the non-volatile memory is realized while avoiding a bulky electronic unit and also an increase of manufacturing cost of the electronic unit.
To solve the above-described problems, a data writing method of the present invention, is featured by that in a method for writing data into a non-volatile memory employed in an on-vehicle electronic unit equipped with a plurality of input circuits containing a control circuit having a non-volatile memory and connected to a plurality of external switches, into which operation signals of the respective external switches are entered; a plurality of output circuits for outputting predetermined output signals to an external unit; and a control unit for controlling the respective output signals derived from the plural output circuits in response to the respective operation signals entered via the plural input circuits, in which a predetermined test apparatus is connected to the on-vehicle electronic unit so as to test the electronic unit mounted on a vehicle, the data writing method is comprised of: a first step for outputting a specific input signal with respect to the existing input circuits of the electronic unit from the test apparatus so as to switch an operation mode of the control circuit employed in the electronic unit to a data writing mode for writing the data into the non-volatile memory; a second step for outputting a predetermined write instruction command to the input circuits from the test apparatus when the control circuit is operated in the data writing mode; a third step for transmitting arbitrary data subsequent to the write instruction command from the test apparatus to the input circuits, the arbitrary data being wanted to be written into the non-volatile memory employed in the electronic unit; and a fourth step for confirming as to whether or not the data is written into the non-volatile memory employed in the electronic unit in response to the write instruction command in the test apparatus based upon the output signals derived from the output circuits after the third step.
Preferably, according to the data writing method of the present invention, the first step to the fourth step are executed when the electronic unit is shipped.